package xp.ass.imitate.express.impl;

import lombok.Data;
import xp.ass.imitate.express.XExpression;
import xp.ass.imitate.express.meta.node.XTokenNode;

/**
 * @author chent3
 * @date 2024/9/6
 */
@Data
public class XExpressionImpl implements XExpression {

    private String expression;

    private XTokenNode ast;

    public XExpressionImpl(String expression, XTokenNode ast) {
        this.expression = expression;
        this.ast = ast;
    }

    @Override
    public Object getValue(XExpressState state) {
        return this.ast.getValue(state);
    }
}
